(function ($) {
    'use strict';

    $(function () {
        var $fullText = $('.admin-fullText');
        $('#admin-fullscreen').on('click', function () {
            $.AMUI.fullscreen.toggle();
        });

        $(document).on($.AMUI.fullscreen.raw.fullscreenchange, function () {
            $fullText.text($.AMUI.fullscreen.isFullscreen ? '退出全屏' : '开启全屏');
        });
    });

    jQuery(document).ready(function () {
        jQuery.viewImage({
            'target': '.post img',
            'exclude': '.likes-img img',
            'delay': 300
        });
        $('pre').addClass("line-numbers");
        $("img").lazyload({effect: "fadeIn"});
    });

	window.onload = function(){
        $('#loading').removeClass("loading-active");
	};

	$('#masonry').masonry({
		  columnWidth: 300,
		  itemSelector: '.item',
		  gutter: 40,
		  isAnimated: true
	});

})(jQuery);




